package pro.shushi.pamirs.channel.enmu;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;
import pro.shushi.pamirs.meta.common.enmu.IEnum;

/**
 * ExpEnumChannel
 *
 * @author yakir on 2020/04/18 20:26.
 */
@Errors(displayName = "增强模型模块错误枚举")
public enum ChannelExpEnumerate implements ExpBaseEnum, IEnum<Integer> {

    SYSTEM_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032000, "系统异常"),
    CHANNEL_PREPARE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032001, "同步准备, 查询配置模型异常"),
    CHANNEL_PREPARE_ERROR_0(ERROR_TYPE.SYSTEM_ERROR, 10032002, "同步准备, 参数不合法"),
    CHANNEL_DUMP_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032003, "全量同步失败"),
    CHANNEL_DUMP_DISRUPTOR_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032004, "构建同步队列参数异常"),
    CHANNEL_TENANT_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032005, "租户参数不存在"),
    CHANNEL_DUMP_MANAGER_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032006, "同步准备没有初始化完成"),
    CHANNEL_ENHANCE_MODEL_NODATA_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032007, "同步的模型没有数据"),
    CHANNEL_ENHANCE_MODEL_INCREMENT_OPEN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032008, "模型增量同步已开启"),
    CHANNEL_ENHANCE_MODEL_INCREMENT_CLOSE_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032009, "模型增量同步已关闭"),
    CHANNEL_INCREMENT_OPEN_ILLEGAL_ARG_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032010, "开启增量同步参数不合法"),
    CHANNEL_INCREMENT_CLOSE_ILLEGAL_ARG_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032011, "关闭增量同步参数不合法"),
    CHANNEL_BINLOG_EVENT_CONSUME_ERROR(ERROR_TYPE.BIZ_ERROR, 10032012, "增量同步消费消息异常"),
    CHANNEL_INCREMENT_SWITCH_NOT_OPEN_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032013, "增量同步开关未开启"),
    CHANNEL_FULL_DUMP_FIRST_ID_ILLEGAL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032014, "全量同步起始ID获取异常"),
    CHANNEL_FULL_DUMP_LAST_ID_ILLEGAL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032015, "全量同步结束ID获取异常"),
    CHANNEL_ENHANCE_MODEL_INCREMENT_OPEN_FAIL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032016, "模型增量同步开启失败"),
    CHANNEL_ENHANCE_MODEL_INCREMENT_CLOSE_FAIL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032017, "模型增量同步关闭失败"),
    CHANNEL_ENHANCE_MODEL_TABLE_2_MODEL_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032018, "通过表名查找模型失败"),
    CHANNEL_CREATE_INDEX_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032019, "创建索引失败"),
    CHANNEL_CREATE_MAPPING_ERROR(ERROR_TYPE.SYSTEM_ERROR, 10032020, "创建索引Mapping失败");

    private final ERROR_TYPE type;

    private final int code;

    private final String msg;

    ChannelExpEnumerate(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }
}
